<?php
$user_c=$_GET['user'];
$password_c=md5(md5($_GET['password']).'0000');
$password_new=md5(md5($_GET['password_new']).'0000');
$host='localhost';
$user='root';
$password='Xiangni365';
$database='login';
$con=mysqli_connect($host,$user,$password,$database);
if(!$con){
    die(mysqli_connect_error());
}
$check_user=mysqli_fetch_array(mysqli_query($con,"SELECT id FROM login_check WHERE user='$user_c'"));
$check_password=mysqli_fetch_array(mysqli_query($con,"SELECT id FROM login_check WHERE password='$password_c'"));
if($check_user!=null&&$check_password!=null&&$check_password==$check_user){
    $set_password=mysqli_query($con,"UPDATE login_check SET password='$password_new' WHERE user='$user_c'");
    echo('1');
}
else{
    echo('0');
}
?>